/*
 * @Author: wangjq4214
 * @Date: 2022-05-03 16:35:46
 * @LastEditTime: 2022-05-03 22:33:07
 * @LastEditors: wangjq4214
 */
import settings from '@/settings.json';

export const settingsAtom = atom({ ...settings });

export const tokenAtom = atomWithStorage('token', '', {
  getItem: (k) => {
    return sessionStorage.getItem(k) || '';
  },
  setItem: (k, v) => {
    sessionStorage.setItem(k, v);
  },
  removeItem: (k) => {
    sessionStorage.removeItem(k);
  },
});
